package fyp.spedmew.backend.entity;

import com.googlecode.objectify.Key;
import com.googlecode.objectify.annotation.Entity;
import com.googlecode.objectify.annotation.Id;
import com.googlecode.objectify.annotation.Index;

import java.beans.Transient;

import javax.xml.validation.Validator;

import fyp.spedmew.backend.category.UserType;

@Entity
public class User {

    public User() {};

    @Id
    private Long id;

    @Index
    private String name;

    private String password;

    @Index
    private String phone;

    private String type;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public Long getId() {
        return id;
    }

    @Transient
    Key<User> getKey() {
        return Key.create(User.class, id);
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

}